﻿namespace MoonFramework
{
	/// <summary>
	/// 线程安全
	/// </summary>
	/// <typeparam name="T">泛型类型</typeparam>
	public class BaseManager<T> where T : new()
	{
		private static T instance;
		private static object _lock = new();
		public static T Instance
		{
			get
			{
				lock (_lock)
				{
					instance ??= new();
				}
				return instance;
			}
		}
	}
}